package com.louis.web.paging;

import java.io.Serializable;
import java.util.List;

public interface Paging<T> extends Serializable {

	/**
	 * To get page number
	 * 
	 * @return page number
	 */
	int getCurrentPage();

	/**
	 * To get how many items will be shown in one page
	 * 
	 * @return
	 */
	int getPageSize();

	/**
	 * To get the items belong to current page with given size(page-size)
	 * 
	 * @return
	 */
	List<T> getItems();

	/**
	 * get items size
	 * 
	 * @return
	 */
	int getItemsSize();

	/**
	 * get next page
	 * 
	 * @return
	 */
	int getNextPage();

	/**
	 * get previous page
	 * 
	 * @return
	 */
	int getPreviousPage();

	/**
	 * get total number of pages
	 * 
	 * @return
	 */
	int getTotalPage();

	/**
	 * get first result
	 * 
	 * @return
	 */
	int getFirstResult();

	/**
	 * <method description>
	 *
	 * @return
	 */
	
	boolean hasNextPage();

	/**
	 * <method description>
	 * 
	 * @return
	 */

	boolean hasPreviousPage();

}
